<!DOCTYPE html>
<html>

	<head>
		<meta name="viewport" content="width=device-width-10, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
		<meta charset="UTF-8">
		<link rel="icon" href="img/favicon.ico">
		<link rel="shortcut icon" href="img/favicon.ico">

		<title>反馈页面</title>

		<link rel="stylesheet" href="css/mdui.css">
		<script src="js/mdui.js"></script>

	</head>

	<body class="mdui-theme-primary-indigo mdui-theme-accent-indigo">

		<!--appbar-->
		<div class="mdui-appbar">
			<div class="mdui-toolbar mdui-color-theme">

				<a href="javascript:;" class="mdui-typo-headline">反馈页面</a>
				<div class="mdui-toolbar-spacer"></div>
				<a href="javascript:;" class="mdui-btn mdui-btn-icon" mdui-menu="{target: '#main-menu'}"><i class="mdui-icon material-icons">more_vert</i></a>

				<ul class="mdui-menu" id="main-menu">
					<li class="mdui-menu-item">
						<a href="https://dabai2017.gitee.io/lead/" class="mdui-ripple" target="_blank">引导页</a>
					</li>

					<li class="mdui-menu-item">
						<a href="javascript:alert('这些信息会发送到开发者的微信');" class="mdui-ripple">帮助</a>
					</li>
				</ul>
			</div>

		</div>

		<div class="mdui-card mdui-m-a-2">

			<!-- 卡片的内容 -->
			<div class="mdui-card-content">

				<div class="mdui-textfield mdui-textfield-floating-label">
					<label class="mdui-textfield-label">反馈内容</label>
					<textarea class="mdui-textfield-input" id="te1"></textarea>
				</div>

				<div class="mdui-textfield mdui-textfield-floating-label">
					<label class="mdui-textfield-label">联系方式/QQ/Email</label>
					<input class="mdui-textfield-input" id="te2" />
				</div>

			</div>

			<!-- 卡片的按钮 -->
			<div class="mdui-card-actions">
				<button id="bu1" class="mdui-btn mdui-ripple mdui-float-right mdui-color-theme-accent" onclick="send()">发送</button>
			</div>

		</div>

		<p class="mdui-m-a-2" style="color: #9FA8DA;font-size: 12px;">如果你有更多信息要反馈，<br />请发送邮件到
			<a href="mailto:1904812793@qq.com?subject=问题反馈&body=这是反馈的内容">1904812793@qq.com</a>
		</p>
		
		
	</body>

	<script type="text/javascript">
		var te1 = document.getElementById("te1");
		var te2 = document.getElementById("te2");
		var bu1 = document.getElementById("bu1");

		function send() {

			if(te1.value.length < 5) {
				mdui.snackbar({
					message: '字数不能低于5个字！'
				});
			} else {

				bu1.innerText = "发送中...";

				var xmlhttp = new XMLHttpRequest();
				xmlhttp.onreadystatechange = function() {

					if(xmlhttp.readyState == 4) {

						bu1.innerText = "发送";
						mdui.snackbar({
							message: '发送成功！'
						});
					}

				}

				xmlhttp.open("GET", "https://sc.ftqq.com/SCU35649Tec88ecad70ac8f2375a6c5a6e323c8425be9602402c5b.send?text=反馈页面发来的消息&desp=" + te1.value + "[联系方式：" + te2.value + "]", true);
				xmlhttp.send();

			}

		}
	</script>

</html>